package One;

import java.io.*;
import java.net.*;
import java.util.*;

public class Serveice {
	public static void main(String[] args) throws UnknownHostException, IOException {
		Scanner scanner=new Scanner(System.in);
		Socket s = new Socket("127.0.0.1", 8190);
		String line;
		while (!(line=scanner.nextLine()).equals("quit")) {
			try
	         {
	            InputStream inStream = s.getInputStream();
	            Scanner in = new Scanner(inStream);

	            while (in.hasNextLine())
	            {
	               String line2 = in.nextLine();
	               System.out.println(line2);
	            }
	         }
		}
		s.close();
		scanner.close();
			
	}
}
